﻿<%@ Page Language="C#" AutoEventWireup="true" Inherits="ParticipantRegistration"
    CodeBehind="ParticipantRegistration.aspx.cs" %>

<%@ Register Assembly="AjaxControlLib" Namespace="AjaxControlLib" TagPrefix="cc1" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc2" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>Client Meeting Tool - Participant Registration </title>
    <link type="text/css" href="nac.css" rel="stylesheet" />
    <script src="Scripts/jquery-1.9.1.js" type="text/javascript"></script>
    <link href="CSS/jquery-ui-1.10.3.custom.css" rel="stylesheet" type="text/css" />
    <script src="Scripts/jquery-ui-1.10.3.custom.js" type="text/javascript"></script>
    <script type="text/javascript">
        $(document).ready(function () {
            $('.mydatepickerclass').datepicker({ showOn: "button",
                buttonImage: "_includes/images/ico_calbtn.gif",
                dateFormat: 'MM dd, yy',
                buttonImageOnly: true, onSelect: function () { }
            });
            Sys.WebForms.PageRequestManager.getInstance().add_endRequest(EndRequestHandler);
            $('.mydatepickerclass').attr("disabled", "disabled");

            function EndRequestHandler(sender, args) {
                $('.mydatepickerclass').datepicker({ showOn: "button",
                    buttonImage: "_includes/images/ico_calbtn.gif",
                    dateFormat: 'MM dd, yy',
                    buttonImageOnly: true, onSelect: function () { }
                });
                $('.mydatepickerclass').attr("disabled", "disabled");
            }

        });
    </script>
</head>
<body>
    <form id="form1" runat="server">
    <style>
        body
        {
            font-family: Arial, Helvetica, sans-serif;
            font-size: 9pt;
        }
        
        .Button
        {
            background-color: #1e8ce1;
            border: #0d5b97 1px solid;
            color: #FFFFFF;
            font-family: Arial, Helvetica, sans-serif;
            font-size: 9pt;
            padding: 3px;
        }
        
        .Button1
        {
            background-color: #1e8ce1;
            border: #0d5b97 1px solid;
            color: #FFFFFF;
            font-family: Arial, Helvetica, sans-serif;
            font-size: 9pt;
            width: 28px;
            padding: 3px;
        }
        
        .overlay
        {
            position: absolute;
            background-color: white;
            top: auto;
            left: auto;
            width: 100%;
            height: 100%;
            opacity: 0.8;
            -moz-opacity: 0.8;
            filter: alpha(opacity=60);
            -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=60)";
            z-index: 10000;
            text-align: center;
            padding-top: 25%;
        }
        
        .style1
        {
            width: 297px;
        }
        
        .style3
        {
            width: 297px;
        }
    </style>
    <div>
        <cc2:ToolkitScriptManager ID="scmParticipantRegistration" runat="server">
        </cc2:ToolkitScriptManager>
        <asp:UpdateProgress ID="uprgProgressBar" runat="server" DynamicLayout="true">
            <ProgressTemplate>
                <div class="overlay">
                    <img src="_includes/images/prog.gif" />
                    Loading...
                </div>
            </ProgressTemplate>
        </asp:UpdateProgress>
        <div id="divBanner">
            <cc1:Banner ID="Banner1" runat="server" Width="100%" />
        </div>
        <asp:UpdatePanel ID="upnlParticipantRegistration" runat="server" UpdateMode="Conditional">
            <ContentTemplate>
                <asp:Label ID="lblMessage" runat="server" Text="You are not authorized to view this page."></asp:Label>
                <asp:ValidationSummary ID="vlsRegistration" runat="server" CssClass="RequiredField"
                    HeaderText="Please fix the following errors:" ValidationGroup="Registration" />
                <table id="tblParticipantRegistration" style="width: 98%; text-align: left; vertical-align: top;
                    margin: 0px 15px 5px 15px;" runat="server" cellpadding="0" cellspacing="0">
                    <tr style="border-color: white;">
                        <td class="GroupHeader" style="height: 18px; text-align: left;" colspan="3" valign="middle">
                            Participant Registration - Event Name :
                            <asp:Label ID="lblEventName" runat="server" Text=""></asp:Label>
                        </td>
                    </tr>
                    <tr style="padding-top: 5px; padding-left: 2px;">
                        <td style="width: 25%; vertical-align: top;">
                            <asp:Label ID="lblParticipant" runat="server" Text="Participant"></asp:Label>
                        </td>
                        <td class="style1">
                            <asp:DropDownList ID="ddlParticipant" runat="server" DataValueField="EventAttendeeID"
                                DataTextField="EmailName" OnSelectedIndexChanged="ddlParticipant_SelectedIndexChanged"
                                AutoPostBack="True" ValidationGroup="Registration" Width="410" CssClass="RequiredField">
                            </asp:DropDownList>
                            <asp:RequiredFieldValidator ID="rfvParticipant" InitialValue="0" runat="server" ErrorMessage="Select a participant."
                                ControlToValidate="ddlParticipant" ValidationGroup="Registration" Display="Dynamic"
                                Text="*"></asp:RequiredFieldValidator>
                        </td>
                        <td rowspan="37" style="vertical-align: top; text-align: right;">
                            <table id="tblRegisteredParticipants" runat="server" cellpadding="0" cellspacing="0"
                                style="vertical-align: top; text-align: left;">
                                <tr style="text-align: left;">
                                    <td class="GroupHeader" style="height: 18px; text-align: left;" valign="middle" colspan="2">
                                        Already Registered Participants
                                    </td>
                                </tr>
                                <tr style="vertical-align: top; padding-top: 15px; padding-left: 10px;">
                                    <td>
                                        <cc2:ListSearchExtender ID="lseRegisteredParticipants" TargetControlID="lstRegisteredParticipants"
                                            PromptText="Type to search" PromptCssClass="ListSearchExtenderPrompt" PromptPosition="Top"
                                            IsSorted="false" runat="server">
                                        </cc2:ListSearchExtender>
                                        <asp:ListBox ID="lstRegisteredParticipants" runat="server" SelectionMode="Single"
                                            DataTextField="EmailName" DataValueField="EventAttendeeID" Width="410px" Style="border: none;"
                                            Height="145px"></asp:ListBox>
                                    </td>
                                </tr>
                                <tr style="vertical-align: top; padding-left: 10px;">
                                    <td>
                                        <asp:LinkButton ID="lnkExportToExcell" runat="server" ToolTip="Export All Records To Excel"
                                            OnClick="lnkExportToExcell_Click">Export All Records To Excel</asp:LinkButton>
                                    </td>
                                </tr>
                            </table>
                        </td>
                    </tr>
                    <tr style="padding-top: 5px; padding-left: 2px;">
                        <td>
                            <asp:Label ID="lblFirstName" runat="server" Text="First Name"></asp:Label>
                        </td>
                        <td class="style3">
                            <asp:Label ID="lblFName" runat="server"></asp:Label>
                        </td>
                    </tr>
                    <tr style="padding-top: 5px; padding-left: 2px;">
                        <td>
                            <asp:Label ID="lblLastName" runat="server" Text="Last Name"></asp:Label>
                        </td>
                        <td class="style3">
                            <asp:Label ID="lblLName" runat="server"></asp:Label>
                        </td>
                    </tr>
                    <tr style="padding-top: 5px; padding-left: 2px;">
                        <td>
                            <asp:Label ID="lblEmailID" runat="server" Text="Email ID"></asp:Label>
                        </td>
                        <td class="style3">
                            <asp:Label ID="lblEid" runat="server"></asp:Label>
                        </td>
                    </tr>
                    <tr id="Q1" runat="server" style="padding-top: 5px; padding-left: 2px; display: none;">
                        <td>
                            <asp:Label ID="lblSalutation" runat="server" Text="Salutation"></asp:Label>
                        </td>
                        <td class="style1">
                            <asp:DropDownList ID="ddlSalutation" runat="server" CssClass="RequiredField">
                                <asp:ListItem>Dr.</asp:ListItem>
                                <asp:ListItem Selected="True">Mr.</asp:ListItem>
                                <asp:ListItem>Mrs.</asp:ListItem>
                                <asp:ListItem>Ms</asp:ListItem>
                            </asp:DropDownList>
                        </td>
                    </tr>
                    <tr id="Q2" runat="server" style="padding-top: 5px; padding-left: 2px; display: none;">
                        <td style="vertical-align: top;">
                            <asp:Label ID="lblPrefAdd" runat="server" Text="Preferred form of address"></asp:Label>
                        </td>
                        <td class="style1">
                            <asp:TextBox ID="txtPrefAdd" runat="server" TextMode="MultiLine" Width="405" Height="70px"
                                onkeypress="return truncMaxLength(this,'1000');" onblur="truncMaxLength(this,'1000');"></asp:TextBox>
                        </td>
                    </tr>
                    <tr id="Q3" runat="server" style="padding-top: 5px; padding-left: 2px; display: none;">
                        <td>
                            <asp:Label ID="lblOffice" runat="server" Text="Office"></asp:Label>
                        </td>
                        <td class="style1">
                            <asp:TextBox ID="txtOffice" runat="server" Width="405"></asp:TextBox>
                        </td>
                        <td>
                        </td>
                    </tr>
                    <tr id="Q4" runat="server" style="padding-top: 5px; padding-left: 2px; display: none;">
                        <td style="vertical-align: top;">
                            <asp:Label ID="lblCountryRep" runat="server" Text="Country/ies you will be representing at the think tank"></asp:Label>
                        </td>
                        <td class="style1">
                            <asp:TextBox ID="txtCountryRep" runat="server" TextMode="MultiLine" Width="405" Height="70px"
                                onkeypress="return truncMaxLength(this,'1000');" onblur="truncMaxLength(this,'1000');"></asp:TextBox>
                        </td>
                        <td>
                        </td>
                    </tr>
                    <tr id="Q5" runat="server" style="padding-top: 5px; padding-left: 2px; display: none;">
                        <td>
                            <asp:Label ID="lblConfAtt" runat="server" Text="Confirmation of attendance"></asp:Label>
                        </td>
                        <td class="style1">
                            <asp:RadioButtonList ID="rblConfAtt" runat="server" RepeatDirection="Horizontal">
                                <asp:ListItem Text="Yes" Value="Yes" Selected="False"></asp:ListItem>
                                <asp:ListItem Text="No" Value="No" Selected="False"></asp:ListItem>
                            </asp:RadioButtonList>
                        </td>
                        <td>
                        </td>
                    </tr>
                    <tr id="Q6" runat="server" style="padding-top: 5px; padding-left: 2px; display: none;">
                        <td>
                            <asp:Label ID="lblArrDate" runat="server" Text="Arrival Date"></asp:Label>
                        </td>
                        <td class="style1">
                            <asp:TextBox ID="txtArrDate" runat="server" CssClass="mydatepickerclass"></asp:TextBox>
                        </td>
                        <td>
                        </td>
                    </tr>
                    <tr id="Q7" runat="server" style="padding-top: 5px; padding-left: 2px; display: none;">
                        <td>
                            <asp:Label ID="lblArrTime" runat="server" Text="Arrival Time"></asp:Label>
                        </td>
                        <td class="style1">
                            <asp:DropDownList ID="ddlArrTimeHrs" runat="server">
                                <asp:ListItem>00</asp:ListItem>
                                <asp:ListItem>01</asp:ListItem>
                                <asp:ListItem>02</asp:ListItem>
                                <asp:ListItem>03</asp:ListItem>
                                <asp:ListItem>04</asp:ListItem>
                                <asp:ListItem>05</asp:ListItem>
                                <asp:ListItem>06</asp:ListItem>
                                <asp:ListItem>07</asp:ListItem>
                                <asp:ListItem>08</asp:ListItem>
                                <asp:ListItem>09</asp:ListItem>
                                <asp:ListItem>10</asp:ListItem>
                                <asp:ListItem>11</asp:ListItem>
                                <asp:ListItem>12</asp:ListItem>
                                <asp:ListItem>13</asp:ListItem>
                                <asp:ListItem>14</asp:ListItem>
                                <asp:ListItem>15</asp:ListItem>
                                <asp:ListItem>16</asp:ListItem>
                                <asp:ListItem>17</asp:ListItem>
                                <asp:ListItem>18</asp:ListItem>
                                <asp:ListItem>19</asp:ListItem>
                                <asp:ListItem>20</asp:ListItem>
                                <asp:ListItem>21</asp:ListItem>
                                <asp:ListItem>22</asp:ListItem>
                                <asp:ListItem>23</asp:ListItem>
                            </asp:DropDownList>
                            <asp:DropDownList ID="ddlArrTimeMns" runat="server">
                                <asp:ListItem>00</asp:ListItem>
                                <asp:ListItem>15</asp:ListItem>
                                <asp:ListItem>30</asp:ListItem>
                                <asp:ListItem>45</asp:ListItem>
                            </asp:DropDownList>
                        </td>
                        <td>
                        </td>
                    </tr>
                    <tr id="Q8" runat="server" style="padding-top: 5px; padding-left: 2px; display: none;">
                        <td>
                            <asp:Label ID="lblArrAirport" runat="server" Text="Arrival Airport"></asp:Label>
                        </td>
                        <td class="style1">
                            <asp:TextBox ID="txtArrAirport" runat="server" Width="405"></asp:TextBox>
                        </td>
                        <td>
                        </td>
                    </tr>
                    <tr id="Q9" runat="server" style="padding-top: 5px; padding-left: 2px; display: none;">
                        <td>
                            <asp:Label ID="lblArrAirline" runat="server" Text="Arrival Airline & flight number"></asp:Label>
                        </td>
                        <td class="style1">
                            <asp:TextBox ID="txtArrAirline" runat="server" Width="405"></asp:TextBox>
                        </td>
                        <td>
                        </td>
                    </tr>
                    <tr id="Q10" runat="server" style="padding-top: 5px; padding-left: 2px; display: none;">
                        <td>
                            <asp:Label ID="lblDeptDate" runat="server" Text="Departure Date"></asp:Label>
                        </td>
                        <td class="style1">
                            <asp:TextBox ID="txtDeptDate" runat="server" CssClass="mydatepickerclass"></asp:TextBox>
                            <asp:CustomValidator ID="csvDeptDate" runat="server" ErrorMessage="" Display="Dynamic"
                                Text="*" ValidationGroup="Registration"></asp:CustomValidator>
                        </td>
                        <td>
                        </td>
                    </tr>
                    <tr id="Q11" runat="server" style="padding-top: 5px; padding-left: 2px; display: none;">
                        <td>
                            <asp:Label ID="lblDeptTime" runat="server" Text="Departure Time"></asp:Label>
                        </td>
                        <td class="style1">
                            <asp:DropDownList ID="ddlDeptTimeHrs" runat="server">
                                <asp:ListItem>00</asp:ListItem>
                                <asp:ListItem>01</asp:ListItem>
                                <asp:ListItem>02</asp:ListItem>
                                <asp:ListItem>03</asp:ListItem>
                                <asp:ListItem>04</asp:ListItem>
                                <asp:ListItem>05</asp:ListItem>
                                <asp:ListItem>06</asp:ListItem>
                                <asp:ListItem>07</asp:ListItem>
                                <asp:ListItem>08</asp:ListItem>
                                <asp:ListItem>09</asp:ListItem>
                                <asp:ListItem>10</asp:ListItem>
                                <asp:ListItem>11</asp:ListItem>
                                <asp:ListItem>12</asp:ListItem>
                                <asp:ListItem>13</asp:ListItem>
                                <asp:ListItem>14</asp:ListItem>
                                <asp:ListItem>15</asp:ListItem>
                                <asp:ListItem>16</asp:ListItem>
                                <asp:ListItem>17</asp:ListItem>
                                <asp:ListItem>18</asp:ListItem>
                                <asp:ListItem>19</asp:ListItem>
                                <asp:ListItem>20</asp:ListItem>
                                <asp:ListItem>21</asp:ListItem>
                                <asp:ListItem>22</asp:ListItem>
                                <asp:ListItem>23</asp:ListItem>
                            </asp:DropDownList>
                            <asp:DropDownList ID="ddlDeptTimeMns" runat="server">
                                <asp:ListItem>00</asp:ListItem>
                                <asp:ListItem>15</asp:ListItem>
                                <asp:ListItem>30</asp:ListItem>
                                <asp:ListItem>45</asp:ListItem>
                            </asp:DropDownList>
                        </td>
                        <td>
                        </td>
                    </tr>
                    <tr id="Q12" runat="server" style="padding-top: 5px; padding-left: 2px; display: none;">
                        <td>
                            <asp:Label ID="lblDeptAirport" runat="server" Text="Departure Airport"></asp:Label>
                        </td>
                        <td class="style1">
                            <asp:TextBox ID="txtDeptAirport" runat="server" Width="405"></asp:TextBox>
                        </td>
                        <td>
                        </td>
                    </tr>
                    <tr id="Q13" runat="server" style="padding-top: 5px; padding-left: 2px; display: none;">
                        <td>
                            <asp:Label ID="lblDeptAirline" runat="server" Text="Departure Airline & flight number"></asp:Label>
                        </td>
                        <td class="style1">
                            <asp:TextBox ID="txtDeptAirline" runat="server" Width="405"></asp:TextBox>
                        </td>
                        <td>
                        </td>
                    </tr>
                    <tr id="Q14" runat="server" style="padding-top: 5px; padding-left: 2px; display: none;">
                        <td>
                            <asp:Label ID="lblHotelName" runat="server" Text="Hotel Name"></asp:Label>
                        </td>
                        <td class="style1">
                            <asp:TextBox ID="txtHotelName" runat="server" Width="405"></asp:TextBox>
                        </td>
                        <td>
                        </td>
                    </tr>
                    <tr id="Q15" runat="server" style="padding-top: 5px; padding-left: 2px; display: none;">
                        <td>
                            <asp:Label ID="lblHotelLocation" runat="server" Text="Hotel Location"></asp:Label>
                        </td>
                        <td class="style1">
                            <asp:TextBox ID="txtHotelLocation" runat="server" Width="405"></asp:TextBox>
                        </td>
                        <td>
                        </td>
                    </tr>
                    <tr id="Q16" runat="server" style="padding-top: 5px; padding-left: 2px; display: none;">
                        <td>
                            <asp:Label ID="lblDualHotel" runat="server" Text="Dual location hotels: Name & Location"></asp:Label>
                        </td>
                        <td class="style1">
                            <asp:TextBox ID="txtDualHotel" runat="server" Width="405"></asp:TextBox>
                        </td>
                        <td>
                        </td>
                    </tr>
                    <tr id="Q17" runat="server" style="padding-top: 5px; padding-left: 2px; display: none;">
                        <td style="vertical-align: top;">
                            <asp:Label ID="lblNoOfNights" runat="server" Text="Number of nights"></asp:Label>
                        </td>
                        <td class="style1">
                            <asp:CheckBoxList ID="cblNoOfNights" runat="server" RepeatDirection="Horizontal"
                                RepeatColumns="4">
                            </asp:CheckBoxList>
                        </td>
                        <td>
                        </td>
                    </tr>
                    <tr id="Q18" runat="server" style="padding-top: 5px; padding-left: 2px; display: none;">
                        <td style="vertical-align: top;">
                            <asp:Label ID="lblOtherPref" runat="server" Text="Other Preferences"></asp:Label>
                        </td>
                        <td class="style1">
                            <asp:CheckBoxList ID="cblOtherPref" runat="server" RepeatDirection="Horizontal" RepeatColumns="2">
                                <asp:ListItem Text="Early Check-in" Value="Early Check-in" Selected="False"></asp:ListItem>
                                <asp:ListItem Text="Smoking Room" Value="Smoking Room" Selected="False"></asp:ListItem>
                                <asp:ListItem Text="Late Check-out" Value="Late Check-out" Selected="False"></asp:ListItem>
                                <asp:ListItem Text="Other info - eg more nights" Value="Other info - eg more nights"
                                    Selected="False"></asp:ListItem>
                            </asp:CheckBoxList>
                        </td>
                        <td>
                        </td>
                    </tr>
                    <tr id="Q19" runat="server" style="padding-top: 5px; padding-left: 2px; display: none;">
                        <td>
                            <asp:Label ID="lblNetEvent" runat="server" Text="Networking Event"></asp:Label>
                        </td>
                        <td class="style1">
                            <asp:RadioButtonList ID="rblNetEvent" runat="server" RepeatDirection="Horizontal">
                                <asp:ListItem Text="Yes" Value="Yes" Selected="False"></asp:ListItem>
                                <asp:ListItem Text="No" Value="No" Selected="False"></asp:ListItem>
                            </asp:RadioButtonList>
                        </td>
                        <td>
                        </td>
                    </tr>
                    <tr id="Q20" runat="server" style="padding-top: 5px; padding-left: 2px; display: none;">
                        <td style="vertical-align: top;">
                            <asp:Label ID="lblDietReq" runat="server" Text="Dietary Requirement"></asp:Label>
                        </td>
                        <td class="style1">
                            <asp:CheckBoxList ID="cblDietReq" runat="server" RepeatDirection="Horizontal" RepeatColumns="3">
                                <asp:ListItem Text="None" Value="None" Selected="False"></asp:ListItem>
                                <asp:ListItem Text="Halal" Value="Halal" Selected="False"></asp:ListItem>
                                <asp:ListItem Text="Kosher" Value="Kosher" Selected="False"></asp:ListItem>
                                <asp:ListItem Text="Vegetarian" Value="Vegetarian" Selected="False"></asp:ListItem>
                                <asp:ListItem Text="Vegan" Value="Vegan" Selected="False"></asp:ListItem>
                                <asp:ListItem Text="Other" Value="Other" Selected="False"></asp:ListItem>
                            </asp:CheckBoxList>
                        </td>
                        <td>
                        </td>
                    </tr>
                    <tr id="Q21" runat="server" style="padding-top: 5px; padding-left: 2px; display: none;">
                        <td>
                            <asp:Label ID="lblAvailToPlay" runat="server" Text="Availability to play 'The Game'"></asp:Label>
                        </td>
                        <td class="style1">
                            <asp:RadioButtonList ID="rblAvailToPlay" runat="server" RepeatDirection="Horizontal">
                                <asp:ListItem Text="Yes" Value="Yes" Selected="False"></asp:ListItem>
                                <asp:ListItem Text="No" Value="No" Selected="False"></asp:ListItem>
                            </asp:RadioButtonList>
                        </td>
                        <td>
                        </td>
                    </tr>
                    <tr id="Q22" runat="server" style="padding-top: 5px; padding-left: 2px; display: none;">
                        <td>
                            <asp:Label ID="lblDirectDial" runat="server" Text="Direct Dial"></asp:Label>
                        </td>
                        <td class="style1">
                            <asp:TextBox ID="txtDirectDial" runat="server" Width="405"></asp:TextBox>
                        </td>
                        <td>
                        </td>
                    </tr>
                    <tr id="Q23" runat="server" style="padding-top: 5px; padding-left: 2px; display: none;">
                        <td>
                            <asp:Label ID="lblMobNo" runat="server" Text="Mobile No"></asp:Label>
                        </td>
                        <td class="style1">
                            <asp:TextBox ID="txtMobNo" runat="server" Width="405"></asp:TextBox>
                        </td>
                        <td>
                        </td>
                    </tr>
                    <tr id="Q24" runat="server" style="padding-top: 5px; padding-left: 2px; display: none;">
                        <td>
                            <asp:Label ID="lblAssistantName" runat="server" Text="Assistant Name"></asp:Label>
                        </td>
                        <td class="style1">
                            <asp:TextBox ID="txtAssistantName" runat="server" Width="405"></asp:TextBox>
                        </td>
                        <td>
                        </td>
                    </tr>
                    <tr id="Q25" runat="server" style="padding-top: 5px; padding-left: 2px; display: none;">
                        <td>
                            <asp:Label ID="lblAssistantTelno" runat="server" Text="Assistant Tel No"></asp:Label>
                        </td>
                        <td class="style1">
                            <asp:TextBox ID="txtAssistantTelno" runat="server" Width="405"></asp:TextBox>
                        </td>
                        <td>
                        </td>
                    </tr>
                    <tr id="Q26" runat="server" style="padding-top: 5px; padding-left: 2px; display: none;">
                        <td>
                            <asp:Label ID="lblAssistantEmailID" runat="server" Text="Assistant Email Address"></asp:Label>
                        </td>
                        <td class="style1">
                            <asp:TextBox ID="txtAssistantEmailID" runat="server" Width="405"></asp:TextBox>
                            <asp:RegularExpressionValidator ID="revAssistantEmailID" runat="server" ControlToValidate="txtAssistantEmailID"
                                Display="Dynamic" Text="*" ErrorMessage="Enter proper format for email address in assistant email address field."
                                ValidationExpression="\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*" ValidationGroup="Registration"></asp:RegularExpressionValidator>
                        </td>
                        <td>
                        </td>
                    </tr>
                    <tr id="Q27" runat="server" style="padding-top: 5px; padding-left: 2px; display: none;">
                        <td>
                            <asp:Label ID="lblVisaReq" runat="server" Text="Visa Required"></asp:Label>
                        </td>
                        <td class="style1">
                            <asp:RadioButtonList ID="rblVisaReq" runat="server" RepeatDirection="Horizontal">
                                <asp:ListItem Text="Yes" Value="Yes" Selected="False"></asp:ListItem>
                                <asp:ListItem Text="No" Value="No" Selected="False"></asp:ListItem>
                            </asp:RadioButtonList>
                        </td>
                        <td>
                        </td>
                    </tr>
                    <tr id="Q28" runat="server" style="padding-top: 5px; padding-left: 2px; display: none;">
                        <td style="vertical-align: top;">
                            <asp:Label ID="lblSpecialReq" runat="server" Text="Special Requirements"></asp:Label>
                        </td>
                        <td class="style1">
                            <asp:TextBox ID="txtSpecialReq" runat="server" TextMode="MultiLine" Width="405" Height="70px"
                                onkeypress="return truncMaxLength(this,'1000');" onblur="truncMaxLength(this,'1000');"></asp:TextBox>
                        </td>
                        <td>
                        </td>
                    </tr>
                    <tr id="Q29" runat="server" style="padding-top: 5px; padding-left: 2px; display: none;">
                        <td>
                            <asp:Label ID="lblCPEAcc" runat="server" Text="CPE Accreditation- Course number"></asp:Label>
                        </td>
                        <td class="style1">
                            <asp:TextBox ID="txtCPEAcc" runat="server" Width="405"></asp:TextBox>
                        </td>
                        <td>
                        </td>
                    </tr>
                    <tr id="Q30" runat="server" style="padding-top: 5px; padding-left: 2px; display: none;">
                        <td>
                            <asp:Label ID="lblCBSubmitted" runat="server" Text="CV - Has CV been submitted"></asp:Label>
                        </td>
                        <td class="style1">
                            <asp:RadioButtonList ID="rblCBSubmitted" runat="server" RepeatDirection="Horizontal">
                                <asp:ListItem Text="Yes" Value="Yes" Selected="False"></asp:ListItem>
                                <asp:ListItem Text="No" Value="No" Selected="False"></asp:ListItem>
                            </asp:RadioButtonList>
                        </td>
                        <td>
                        </td>
                    </tr>
                    <tr id="Q31" runat="server" style="padding-top: 5px; padding-left: 2px; display: none;">
                        <td style="vertical-align: top;">
                            <asp:Label ID="lblOtherComments" runat="server" Text="Other Comments"></asp:Label>
                        </td>
                        <td class="style1">
                            <asp:TextBox ID="txtOtherComments" runat="server" TextMode="MultiLine" Width="405"
                                Height="70px" onkeypress="return truncMaxLength(this,'1000');" onblur="truncMaxLength(this,'1000');"></asp:TextBox>
                        </td>
                        <td>
                        </td>
                    </tr>
                    <tr style="padding-top: 5px; padding-left: 2px;">
                        <td colspan="3">
                            <asp:Button ID="btnSaveRegistration" runat="server" Text="Register" Width="180px"
                                OnClick="btnSaveRegistration_Click" ValidationGroup="Registration" CssClass="Button"
                                ToolTip="Click here to save the registration details." />
                            <asp:Button ID="btnClearAll" runat="server" Text="Clear All" Width="90px" OnClick="btnClearAll_Click"
                                OnClientClick="return ClearAllFields();" CssClass="Button" ToolTip="Click here to clear all the entered fields." />
                        </td>
                    </tr>
                    <tr>
                        <td>
                        </td>
                    </tr>
                </table>
            </ContentTemplate>
            <Triggers>
                <asp:AsyncPostBackTrigger ControlID="btnSaveRegistration" EventName="Click" />
                <asp:AsyncPostBackTrigger ControlID="btnClearAll" EventName="Click" />
                <asp:AsyncPostBackTrigger ControlID="ddlParticipant" EventName="SelectedIndexChanged" />
                <asp:PostBackTrigger ControlID="lnkExportToExcell" />
            </Triggers>
        </asp:UpdatePanel>
    </div>
    <script language="javascript" type="text/javascript">

        // Function to confirm that user want to clear all entered fields.
        function ClearAllFields() {
            return confirm("All the details will be cleared, are you sure you want to clear all ?");
        }

        // Function to validate the max length of multiline textbox.
        function truncMaxLength(txtControl, maxLength) {
            try {
                if (txtControl.value.length > maxLength) {
                    txtControl.value = txtControl.value.substring(0, maxLength);
                    alert("Maximum charactors allowed is - " + maxLength.toString());
                    return false;
                }
            }
            catch (e) {
            }
        }

    </script>
    </form>
</body>
</html>
